package com.school.aftersalemanagement.controller.ui.loadurl;

import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.school.aftersalemanagement.R;
import com.school.aftersalemanagement.global.BaseToolBarActivity;

import butterknife.BindView;

public class LoadUrlActivity extends BaseToolBarActivity {
    @BindView(R.id.loadurl)
    WebView loadurl;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_loadurl);
        setToolbarText(getIntent().getStringExtra("name"));
        WebSettings webSettings = loadurl.getSettings();
        //设置支持缩放
        webSettings.setBuiltInZoomControls(true);

        loadurl.setWebViewClient(new WebViewClient(){
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                return false;// 返回false
            }
        });
        //加载需要显示的网页
        loadurl.loadUrl(getIntent().getStringExtra("url"));
        //设置Web视图
    }

}
